local skill = fk.CreateSkill {
  name = "#heg__bronze_sparrow_skill",
  tags = { Skill.Compulsory },
  attached_equip = "heg__bronze_sparrow",
}

Fk:loadTranslationTable{
  ["#heg__bronze_sparrow_skill"] = "铜雀",
}

skill:addEffect(fk.PreCardUse, {
  can_refresh = function(self, event, target, player, data)
    return target == player and player:hasSkill(skill.name) and table.find({"@fujia-public", "@kongchao-public", "@canqu-public", "@zhuzhan-public", "@heg_yibing-public"}, function(mark)
        return data.card.extra_data and data.card.extra_data.heg_variation and
          data.card.extra_data.heg_variation[1] == mark
      end)
  end,
  on_refresh = function(self, event, target, player, data)
    data.extra_data = data.extra_data or {}
    data.extra_data.heg_variation_type = {"@fujia-public", "@kongchao-public", "@canqu-public", "@zhuzhan-public", "@heg_yibing-public"}
    player.room:notifySkillInvoked(player, skill.name, "offensive")
  end,
})

return skill
